
function openUrl(id){  
    try  
        {  
            if(top!=this)  
                {  
                self.parent.addTabRecordView(id);  
                }  
                else  
                {  
            window.open("RecordView.html?id="+id,'XX',' left=0,top=0,width='+ (screen.availWidth - 10) +',height='+ (screen.availHeight-50) );  
                }  
        }  
        catch(err)  
        {  
              window.open("RecordView.html?id="+id,'XX',' toolbar=yes,status=yes,location=yes,menubar=yes,scrollbars=yes,left=0,top=0,width='+ (screen.availWidth - 10) +',height='+ (screen.availHeight-50) );  
        }  
  
    }  
  
    $(document).ready(function() {  
        $('#calendar').fullCalendar({  
        header: {  
                left: 'prev,next today',  
                center: 'title',  
                right: 'month,basicWeek,basicDay'  
            },  
              
            monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],    
            monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],    
            dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],    
            dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],    
            today: ["今天"],    
            //firstDay: 1,    
            buttonText:{  
                prev:     '上一页',  
                next:     '下一页',  
                prevYear: '去年',  
                nextYear: '明年',  
                today:    '今天',  
                month:    '月',  
                week:     '周',  
                day:      '日'  
                },  
  
            editable: true,
			disableDragging: false,
            currentTimezone: 'Asia/Beijing',    
            loading: function(bool) {  
                        if (bool) $('#loading').show();  
                        else $('#loading').hide();  
                    },  
            events: "/index.php?c=taskcalendar&m=get_task_for_cal",  
            eventClick: function(ev) {   
                        openUrl(ev.id);  
                        //alert(ev.id);  
                        },    
            eventMouseover:function(event, jsEvent, view ) {  
                             $(this).css('border-color', 'red');  
                               
                            },  
                              
            eventMouseout:function(event, jsEvent, view ) {  
                             $(this).css('border-color','blue');  
                                
                            }  
              
        });  
          
          
    });  
